package base.quote;

import java.math.BigDecimal;

public class MainBigDecinal {

	public static void main(String[] args) {
		
		Integer int1 = 1;
		Integer int2 = int1;//值传递
		int2 = 2;
		System.out.println(int2);//2
		System.out.println(int1);//1
		
		BigDecimal big1 = new BigDecimal(1);
		BigDecimal big2 = new BigDecimal(0);
		big2 = big1;
		System.out.println(big2.intValue());//1
		big2 = BigDecimal.valueOf(100);//改变big2值----实则该引用重新指向别处
		System.out.println(big1.intValue());//big1并没有被改变
		
		Integer a = 10000;
		int b = 10000;
		System.out.println(b == a);
		
		Integer c = 127;
		Integer d = 127;
		System.out.println(c == d);
		
		Integer c2 = 128;
		Integer d2 = 128;
		System.out.println(c2 == d2);
	}
	
}
